package net.esj.basic.core.engine.support.message;

import java.util.Locale;

/**
 * 消息提供者
 * @author Administrator
 *
 */
public interface MessageProvider {
	
	public static final String DEFAULT_MESSAGE = "message";

	String getMessage(String sourceName,String code, Object[] args, String defaultMessage, Locale locale);
	
	String getMessage(String sourceName,String code, Object[] args, Locale locale) throws NoSuchMessageException;
	
	String getMessage(String sourceName,MessageResolver resolver, Locale locale) throws NoSuchMessageException;
	
	/**
	 * 排序，用于显示先后顺序
	 * @return
	 */
	int order();
}
